package com.wxb.springboot.springmvc.controller;

import com.wxb.springboot.springmvc.beans.User;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * describe:
 *
 * @author : 王校兵
 * @version : v1.0
 * @time : 2017-09-10 15:09
 */
@RestController
public class ModelAttributeController {

    @RequestMapping("/page")
    public String hello() {
        return "hello";
    }

    @RequestMapping("/hello")
    public String testMethodModelAttribute(User user) {
        System.out.println(user.toString());
        return "success";
    }

    @RequestMapping("/index")
    public String testReturnModelAttribute(User user) {
        System.out.println(user.toString());
        return "success";
    }

}
